package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.aggregate.dto.*;
import com.ruicar.afs.cloud.apply.common.entity.ApplyOrderInfo;
import com.ruicar.afs.cloud.apply.contract.vo.ApplyStatisticsVo;
import com.ruicar.afs.cloud.apply.contract.vo.ApplyUseCarVinVo;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyReportCondition;
import com.ruicar.afs.cloud.bizcommon.business.condition.ApplyTotalCondition;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author: Lee
 * @date: 2020/5/13 21:16
 * @description: 订单service
 */
public interface ApplyOrderInfoService extends IService<ApplyOrderInfo> {

    /**
     * 通过ID获取订单信息
     *
     * @param id
     * @return
     */
    public ApplyOrderInfo getOrderInfoById(Long id);

    /**
     * 通过申请编号获取订单信息
     *
     * @param applyNo
     * @return
     */
    public ApplyOrderInfo getOrderInfoByApplyNo(String applyNo);

    /**
     * 保存订单信息
     *
     * @param applyNo
     * @param condition
     * @return
     */
    public ApplyOrderInfo saveOrderInfo(String applyNo, ApplyReportCondition condition);

    /**
     * 更新订单信息
     *
     * @param orderInfo
     * @param condition
     */
    public void updateOrderInfo(ApplyOrderInfo orderInfo, ApplyReportCondition condition);
    /**
     * 获取订单信息
     *
     * @param channelId,status
     */
    public List<ApplyOrderInfo> getDefaultList(String channelId,String status);
    /**
     * 获取订单数量
     *
     * @param applyTotalCondition
     */
    public List<ApplyOrderInfo> getApplyCount(ApplyTotalCondition applyTotalCondition);
    /**
     * PC按月获取订单数量
     * */
    public List<ApplyStatisticsVo> getApplyCountPc(ApplyTotalCondition applyTotalCondition);
    /**
     * 二手车历史存量
     *
     * @param vin
     * @return
     */
    public List<VinInfoDto> getUsedcarHis(String vin);
    /**
     * 历史贷款金额
     *
     * @param certNoDto
     * @return
     */
    public BigDecimal getLoanhistory(CertNoDto certNoDto);

    /**
     * 进件发送短信接口
     * */
    public void sendApplyMessageInfo(String phone);

    /**
     * 根据vin查询历史订单
     * */
    public List<ApplyUseCarVinVo> getOrderInfoByVin(String vin);

    /**
     * 放款阶段vin查重
     * */
    public List<VinCheckDto> getLoanVinCheck(String vin);

    /**
     * 身份证验重
     * */
    public List<CertNoCheckDto> getCertNoCheckInfo(CertNoDto certNoDto);

    /**
     * 二手车历史存量
     *
     * @param vin
     * @return
     */
    public List<UsedVinInfoDto> getUsedVinInfo(String vin);

    /**
     * 网约车挂靠公司信审
     * */
    public AffiliatedCheckDto getAffiliatedCheckInfo(String creditCode,int limitNumber);
}
